BIN = convacs
OBJS =  convacs2.o
CFLAGS = -Wall -Os
INCLUDES = -I. -I./include
LIBS = -lssl -lcrypto

all: $(BIN) 

$(BIN): $(OBJS)
	$(CC) $(CFLAGS) $(OBJS) -o $@ $(LIBS)
	@echo "make $@ finished on `date`"
	$(MAKE) -C timesync
	cp $(BIN) ../convacs
	cp ././timesync/timesync ../timesync

%.o: %.c
	$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@

clean:
	rm -rf $(BIN) $(OBJS)
	$(MAKE) -C timesync clean
	rm ../convacs ../timesync
